home *** CD-ROM | disk | FTP | other *** search
- #pragma once
-
- #include "CArray.h"
-
- #define N_UNDF 0x00 /* undefined */
- #define N_ABS 0x02 /* absolute address */
- #define N_TEXT 0x04 /* text segment */
- #define N_DATA 0x06 /* data segment */
- #define N_BSS 0x08 /* bss segment */
- #define N_COMM 0x12 /* common reference */
- #define N_FN 0x1e /* file name */
-
- #define N_EXT 0x01 /* external (global) bit, OR'ed in */
- #define N_TYPE 0x1e /* mask for all the type bits */
-
- struct exec
- {
- unsigned short a_mid; /* machine ID */
- unsigned short a_magic; /* magic number */
- unsigned long a_text; /* text segment size */
- unsigned long a_data; /* initialized data size */
- unsigned long a_bss; /* uninitialized data size */
- unsigned long a_syms; /* symbol table size */
- unsigned long a_entry; /* entry point */
- unsigned long a_trsize; /* text relocation size */
- unsigned long a_drsize; /* data relocation size */
- };
-
- struct nlist
- {
- union {
- char *n_name; /* symbol name (in memory) */
- long n_strx; /* file string table offset (on disk) */
- }
- n_un;
- unsigned char n_type; /* type defines */
- char n_other; /* spare */
- short n_desc; /* used by stab entries */
- unsigned long n_value; /* address/value of the symbol */
- };
-
- #define ARMAG "!<arch>\n" /* ar "magic number" */
- #define SARMAG 8 /* strlen(ARMAG); */
-
- #define AR_EFMT1 "#1/" /* extended format #1 */
-
- struct ar_hdr {
- char ar_name[16]; /* name */
- char ar_date[12]; /* modification time */
- char ar_uid[6]; /* user id */
- char ar_gid[6]; /* group id */
- char ar_mode[8]; /* octal file permissions */
- char ar_size[10]; /* size in bytes */
- #define ARFMAG "`\n"
- char ar_fmag[2]; /* consistency check */
- };
-
- class CARArray : public CArray
- {
- public:
- virtual void IARArray( Handle itsData);
- };
-